package cn.tx.service.Impl;

import cn.tx.dao.GradeDao;
import cn.tx.dao.LibraryDao;
import cn.tx.model.Library;
import cn.tx.service.GradeService;
import cn.tx.service.LibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class LibraryServiceImpl implements LibraryService {

    @Autowired
    private LibraryDao libraryDao;
    @Override
    public Library findByUserName(String username){
        return libraryDao.findByUserName(username);

    }
    @Override
    public int addLibrary(Library library){
        return libraryDao.addLibrary(library);

    }
    @Override
    public List<Library> findList(Map<String,Object> query){
        return libraryDao.findList(query);
    }
    @Override
    public List<Library> findAll(){
        return libraryDao.findAll();

    }
    @Override
    public int findTotal(Map<String,Object> query){
        return libraryDao.findTotal(query);

    }
    @Override
    public int UpdateLibraryById(Library library){
        return libraryDao.UpdateLibraryById(library);

    }
    @Override
    public int delete(String ids){
        return libraryDao.delete(ids);

    }

}
